package com.lbh.platforms.windows;

import com.lbh.platforms.windows.structures.gdi.*;
import com.lbh.platforms.windows.structures.user.FARPROC;
import com.lbh.platforms.windows.structures.user.POINT;
import com.lbh.platforms.windows.structures.user.SIZE;
import com.sun.jna.*;

/***
 * project:JRuntime
 * package:com.lbh.platforms.windows.structures
 *
 * @author user:lenovo QQ:1601078366
 * @date 2021/10/18 22:57
 * @version V1.0
 */
@SuppressWarnings({"unused", "AlibabaLowerCamelCaseVariableNaming", "AlibabaAbstractMethodOrInterfaceMethodMustUseJavadoc", "SpellCheckingInspection", "AlibabaCommentsMustBeJavadocFormat"})
public interface WinGdi32 extends Library {

    WinGdi32 ins = Native.load("gdi32", WinGdi32.class);
    
    int PFD_TYPE_RGBA = 0;
    int PFD_TYPE_COLORINDEX = 1;

    int PFD_MAIN_PLANE = 0;
    int PFD_OVERLAY_PLANE = 1;
    int PFD_UNDERLAY_PLANE = (-1);

    int PFD_DOUBLEBUFFER = 0x00000001;
    int PFD_STEREO = 0x00000002;
    int PFD_DRAW_TO_WINDOW = 0x00000004;
    int PFD_DRAW_TO_BITMAP = 0x00000008;
    int PFD_SUPPORT_GDI = 0x00000010;
    int PFD_SUPPORT_OPENGL = 0x00000020;
    int PFD_GENERIC_FORMAT = 0x00000040;
    int PFD_NEED_PALETTE = 0x00000080;
    int PFD_NEED_SYSTEM_PALETTE = 0x00000100;
    int PFD_SWAP_EXCHANGE = 0x00000200;
    int PFD_SWAP_COPY = 0x00000400;
    int PFD_SWAP_LAYER_BUFFERS = 0x00000800;
    int PFD_GENERIC_ACCELERATED = 0x00001000;
    int PFD_SUPPORT_DIRECTDRAW = 0x00002000;
    int PFD_DIRECT3D_ACCELERATED = 0x00004000;
    int PFD_SUPPORT_COMPOSITION = 0x00008000;

    int PFD_DEPTH_DONTCARE = 0x20000000;
    int PFD_DOUBLEBUFFER_DONTCARE = 0x40000000;
    int PFD_STEREO_DONTCARE = 0x80000000;

    int GetPaletteEntries(Pointer hpal, int iStart, int cEntries, PALETTEENTRY pPalEntries);
    int GetPixel(Pointer hdc, int x, int y);
    int GetPixelFormat(Pointer hdc);
    int GetPolyFillMode(Pointer hdc);
    boolean GetRasterizerCaps(RASTERIZER_STATUS lpraststat, int cjBytes);
    int GetRandomRgn (Pointer hdc,Pointer hrgn,int i);
    int GetRegionData(Pointer hrgn, int nCount, RGNDATA lpRgnData);
    int GetRgnBox(Pointer hrgn, RECT lprc);
    Pointer GetStockObject(int i);
    int GetStretchBltMode(Pointer hdc);
    int GetSystemPaletteEntries(Pointer hdc,int iStart,int cEntries,PALETTEENTRY pPalEntries);
    int GetSystemPaletteUse(Pointer hdc);
    int GetTextCharacterExtra(Pointer hdc);
    int GetTextAlign(Pointer hdc);
    int GetTextColor(Pointer hdc);
    boolean GetTextExtentPointA(Pointer hdc, String lpString, int c, SIZE lpsz);
    boolean GetTextExtentPointW(Pointer hdc, WString lpString, int c, SIZE lpsz);
    boolean GetTextExtentPoint32A(Pointer hdc,String lpString,int c,SIZE psizl);
    boolean GetTextExtentPoint32W(Pointer hdc,WString lpString,int c,SIZE psizl);
    boolean GetTextExtentExPointA(Pointer hdc,String lpszString,int cchString,int nMaxExtent,int[] lpnFit,int[] lpnDx,SIZE lpSize);
    boolean GetTextExtentExPointW(Pointer hdc,WString lpszString,int cchString,int nMaxExtent,int[] lpnFit,int[] lpnDx,SIZE lpSize);
    int GetTextCharset(Pointer hdc);
    //int GetTextCharsetInfo(Pointer hdc,LPFONTSIGNATURE lpSig,int dwFlags);
    //boolean TranslateCharsetInfo(int[] lpSrc,LPCHARSETINFO lpCs,int dwFlags);
    int GetFontLanguageInfo(Pointer hdc);
    //int GetCharacterPlacementA(Pointer hdc,String lpString,int nCount,int nMexExtent,LPGCP_RESULTSA lpResults,int dwFlags);
    //int GetCharacterPlacementW(Pointer hdc,WString lpString,int nCount,int nMexExtent,LPGCP_RESULTSW lpResults,int dwFlags);
    int AddFontResourceA(String name);
    int AddFontResourceW(WString name);
    boolean AnimatePalette(Pointer hPal,int iStartIndex,int cEntries,PALETTEENTRY ppe);
    boolean Arc(Pointer hdc,int x1,int y1,int x2,int y2,int x3,int y3,int x4,int y4);
    boolean BitBlt(Pointer hdc,int x,int y,int cx,int cy,Pointer hdcSrc,int x1,int y1,int rop);
    boolean CancelDC(Pointer hdc);
    boolean Chord(Pointer hdc,int x1,int y1,int x2,int y2,int x3,int y3,int x4,int y4);
    int ChoosePixelFormat(Pointer hdc, PIXELFORMATDESCRIPTOR ppfd);
    Pointer CloseMetaFile(Pointer hdc);
    int CombineRgn(Pointer hrgnDst,Pointer hrgnSrc1,Pointer hrgnSrc2,int iMode);
    Pointer CopyMetaFileA(Pointer hFile,String name);
    Pointer CopyMetaFileW(Pointer hFile,WString name);
    Pointer CreateBitmap(int nWidth,int nHeight,int nPlanes,int nBitCount,Pointer lpBits);
    //Pointer CreateBitmapIndirect(BITMAP *pbm);
    //Pointer CreateBrushIndirect(LOGBRUSH *plbrush);
    Pointer CreateCompatibleBitmap(Pointer hdc,int cx,int cy);
    Pointer CreateDiscardableBitmap(Pointer hdc,int cx,int cy);
    Pointer CreateCompatibleDC(Pointer hdc);
    //Pointer CreateDCA(String pwszDriver,String pwszDevice,String pszPort,DEVMODEA *pdm);
    //Pointer CreateDCW(WString pwszDriver,WString pwszDevice,WString pszPort,DEVMODEW *pdm);
    //Pointer CreateDIBitmap(Pointer hdc,BITMAPINFOHEADER *pbmih,int flInit,Pointer pjBits,BITMAPINFO *pbmi,int iUsage);
    Pointer CreateDIBPatternBrush(Pointer h,int iUsage);
    Pointer CreateDIBPatternBrushPt(Pointer lpPackedDIB,int iUsage);
    Pointer CreateEllipticRgn(int x1,int y1,int x2,int y2);
    Pointer CreateEllipticRgnIndirect(RECT lprect);
    //Pointer CreateFontIndirectA(LOGFONTA *lplf);
    //Pointer CreateFontIndirectW(LOGFONTW *lplf);
    Pointer CreateFontA(int cHeight,int cWidth,int cEscapement,int cOrientation,int cWeight,int bItalic,int bUnderline,int bStrikeOut,int iCharSet,int iOutPrecision,int iClipPrecision,int iQuality,int iPitchAndFamily,String pszFaceName);
    Pointer CreateFontW(int cHeight,int cWidth,int cEscapement,int cOrientation,int cWeight,int bItalic,int bUnderline,int bStrikeOut,int iCharSet,int iOutPrecision,int iClipPrecision,int iQuality,int iPitchAndFamily,WString pszFaceName);
    Pointer CreateHatchBrush(int iHatch,int color);
    //Pointer CreateICA(String pszDriver,String pszDevice,String pszPort,DEVMODEA *pdm);
    //Pointer CreateICW(WString pszDriver,WString pszDevice,WString pszPort,DEVMODEW *pdm);
    Pointer CreateMetaFileA(String pszFile);
    Pointer CreateMetaFileW(WString pszFile);
    //Pointer CreatePalette(LOGPALETTE *plpal);
    Pointer CreatePen(int iStyle,int cWidth,int color);
    //Pointer CreatePenIndirect(LOGPEN *plpen);
    Pointer CreatePolyPolygonRgn(POINT pptl, int[] pc, int cPoly, int iMode);
    Pointer CreatePatternBrush(Pointer hbm);
    Pointer CreateRectRgn(int x1,int y1,int x2,int y2);
    Pointer CreateRectRgnIndirect(RECT lprect);
    Pointer CreateRoundRectRgn(int x1,int y1,int x2,int y2,int w,int h);
    boolean CreateScalableFontResourceA(int fdwHidden,String lpszFont,String lpszFile,String lpszPath);
    boolean CreateScalableFontResourceW(int fdwHidden,WString lpszFont,WString lpszFile,WString lpszPath);
    Pointer CreateSolidBrush(int color);
    boolean DeleteDC(Pointer hdc);
    boolean DeleteMetaFile(Pointer hmf);
    boolean DeleteObject(Pointer ho);
    int DescribePixelFormat(Pointer hdc,int iPixelFormat,int nBytes,PIXELFORMATDESCRIPTOR ppfd);
    boolean GetViewportExtEx(Pointer hdc,SIZE lpsize);
    boolean GetViewportOrgEx(Pointer hdc,POINT lppoint);
    boolean GetWindowExtEx(Pointer hdc,SIZE lpsize);
    boolean GetWindowOrgEx(Pointer hdc,POINT lppoint);
    int IntersectClipRect(Pointer hdc,int left,int top,int right,int bottom);
    boolean InvertRgn(Pointer hdc,Pointer hrgn);
    //boolean LineDDA(int xStart,int yStart,int xEnd,int yEnd,LINEDDAPROC lpProc,Pointer data);
    boolean LineTo(Pointer hdc,int x,int y);
    boolean MaskBlt(Pointer hdcDest,int xDest,int yDest,int width,int height,Pointer hdcSrc,int xSrc,int ySrc,Pointer hbmMask,int xMask,int yMask,int rop);
    boolean PlgBlt(Pointer hdcDest,POINT lpPoint,Pointer hdcSrc,int xSrc,int ySrc,int width,int height,Pointer hbmMask,int xMask,int yMask);
    int OffsetClipRgn(Pointer hdc,int x,int y);
    int OffsetRgn(Pointer hrgn,int x,int y);
    boolean PatBlt(Pointer hdc,int x,int y,int w,int h,int rop);
    boolean Pie(Pointer hdc,int left,int top,int right,int bottom,int xr1,int yr1,int xr2,int yr2);
    boolean PlayMetaFile(Pointer hdc,Pointer hmf);
    boolean PaintRgn(Pointer hdc,Pointer hrgn);
    boolean PolyPolygon(Pointer hdc,POINT apt,int asz,int csz);
    boolean PtInRegion(Pointer hrgn,int x,int y);
    boolean PtVisible(Pointer hdc,int x,int y);
    boolean RectInRegion(Pointer hrgn,RECT lprect);
    boolean RectVisible(Pointer hdc,RECT lprect);
    boolean Rectangle(Pointer hdc,int left,int top,int right,int bottom);
    boolean RestoreDC(Pointer hdc,int nSavedDC);
    //Pointer ResetDCA(Pointer hdc,DEVMODEA *lpdm);
    //Pointer ResetDCW(Pointer hdc,DEVMODEW *lpdm);
    int RealizePalette(Pointer hdc);
    boolean RemoveFontResourceA(String lpFileName);
    boolean RemoveFontResourceW(WString lpFileName);
    boolean RoundRect(Pointer hdc,int left,int top,int right,int bottom,int width,int height);
    boolean ResizePalette(Pointer hpal,int n);
    int SaveDC(Pointer hdc);
    int SelectClipRgn(Pointer hdc,Pointer hrgn);
    int ExtSelectClipRgn(Pointer hdc,Pointer hrgn,int mode);
    int SetMetaRgn(Pointer hdc);
    Pointer SelectObject(Pointer hdc,Pointer h);
    Pointer SelectPalette(Pointer hdc,Pointer hPal,boolean bForceBkgd);
    int  SetBkColor(Pointer hdc,int  color);
    int  SetDCBrushColor(Pointer hdc,int  color);
    int  SetDCPenColor(Pointer hdc,int  color);
    int SetBkMode(Pointer hdc,int mode);
    long SetBitmapBits(Pointer hbm,int cb,Pointer pvBits);
    int SetBoundsRect(Pointer hdc,RECT lprect,int flags);
    //int SetDIBits(Pointer hdc,Pointer hbm,int start,int cLines,Pointer lpBits,BITMAPINFO *lpbmi,int ColorUse);
    //int SetDIBitsToDevice(Pointer hdc,int xDest,int yDest,int w,int h,int xSrc,int ySrc,int StartScan,int cLines,Pointer lpvBits,BITMAPINFO *lpbmi,int ColorUse);
    int SetMapperFlags(Pointer hdc,int flags);
    int SetGraphicsMode(Pointer hdc,int iMode);
    int SetMapMode(Pointer hdc,int iMode);
    int SetLayout(Pointer hdc,int l);
    int GetLayout(Pointer hdc);
    Pointer SetMetaFileBitsEx(int cbBuffer,byte[] lpData);
    int SetPaletteEntries(Pointer hpal,int iStart,int cEntries,PALETTEENTRY pPalEntries);
    int  SetPixel(Pointer hdc,int x,int y,int  color);
    boolean SetPixelV(Pointer hdc,int x,int y,int  color);
    boolean SetPixelFormat(Pointer hdc,int format,PIXELFORMATDESCRIPTOR ppfd);
    int SetPolyFillMode(Pointer hdc,int mode);
    boolean StretchBlt(Pointer hdcDest,int xDest,int yDest,int wDest,int hDest,Pointer hdcSrc,int xSrc,int ySrc,int wSrc,int hSrc,int rop);
    boolean SetRectRgn(Pointer hrgn,int left,int top,int right,int bottom);
    //int StretchDIBits(Pointer hdc,int xDest,int yDest,int DestWidth,int DestHeight,int xSrc,int ySrc,int SrcWidth,int SrcHeight,Pointer lpBits,BITMAPINFO *lpbmi,int iUsage,int rop);
    int SetROP2(Pointer hdc,int rop2);
    int SetStretchBltMode(Pointer hdc,int mode);
    int SetSystemPaletteUse(Pointer hdc,int use);
    int SetTextCharacterExtra(Pointer hdc,int extra);
    int  SetTextColor(Pointer hdc,int  color);
    int SetTextAlign(Pointer hdc,int align);
    boolean SetTextJustification(Pointer hdc,int extra,int count);
    boolean UpdateColors(Pointer hdc);
    boolean SwapBuffers(Pointer hdc);
}
